package cc.owoo.godpen.analysis.css;

import cc.owoo.godpen.analysis.html.Element;

import java.util.Queue;

/**
 * 子元素选择器
 * Created by nimensei
 * 2022-06-05 下午 08:07
 */
public class ChildrenSelector extends SelectorNode {
    @Override
    void selectElement(Element element, Queue<Element> elements) {
        for (Element child : element.getChildElements())
            elements.add(child);
    }

    @Override
    void matchingElement(Element element, Queue<Element> elements) {
        selectElement(element, elements);
    }

    @Override
    public void stringify(StringBuilder string) {
        string.append('>');
    }
}
